package org.example;

public class Resursion {
    public int max(int[] arr){
        return process(arr,0,arr.length-1);
    }
    public int process(int[] arr,int left,int right){
        if(left==right){
            return arr[left];
        }
        int middle = left + (right-left)/2;
        int Big = process(arr,left,middle);
        int Rig = process(arr,middle+1,right);
        return Math.max(Big,Rig);
    }
}
